
#include <cmath>
#include "ILibMath.h"

using namespace BWE;

ILibrary* ILibMath::Instance()
{
	static ILibrary library("cmath");
	if (library.empty())
	{
		library.registFunction("short abs(short)", abs_short);
		library.registFunction("int abs(int)", abs_int);
		library.registFunction("long abs(long)", abs_long);
		library.registFunction("real abs(real)", abs_real);
		library.registFunction("float abs(float)", abs_float);
		library.registFunction("double abs(double)", abs_double);

		library.registFunction("real acos(real)", acos_real);
		library.registFunction("float acos(float)", acos_float);
		library.registFunction("double acos(double)", acos_double);

		library.registFunction("real acosh(real)", acosh_real);
		library.registFunction("float acosh(float)", acosh_float);
		library.registFunction("double acosh(double)", acosh_double);

		library.registFunction("real asin(real)", asin_real);
		library.registFunction("float asin(float)", asin_float);
		library.registFunction("double asin(double)", asin_double);

		library.registFunction("real asinh(real)", asinh_real);
		library.registFunction("float asinh(float)", asinh_float);
		library.registFunction("double asinh(double)", asinh_double);

		library.registFunction("real atan(real)", atan_real);
		library.registFunction("float atan(float)", atan_float);
		library.registFunction("double atan(double)", atan_double);

		library.registFunction("real atanh(real)", atanh_real);
		library.registFunction("float atanh(float)", atanh_float);
		library.registFunction("atanh(double)", atanh_double);

		library.registFunction("real atan2(real y, real x)", atan2_real);
		library.registFunction("float atan2(float y, float x)", atan2_float);
		library.registFunction("double atan2(double y, double x)", atan2_double);

		library.registFunction("real cbrt(real)", cbrt_real);
		library.registFunction("float cbrt(float)", cbrt_float);
		library.registFunction("double cbrt(double)", cbrt_double);

		library.registFunction("real ceil(real)", ceil_real);
		library.registFunction("float ceil(float)", ceil_float);
		library.registFunction("double ceil(double)", ceil_double);

		library.registFunction("real copysign(real _Number, real _Sign)", copysign_real);
		library.registFunction("float copysign(float _Number, float _Sign)", copysign_float);
		library.registFunction("double copysign(double _Number, double _Sign)", copysign_double);

		library.registFunction("real cos(real)", cos_real);
		library.registFunction("float cos(float)", cos_float);
		library.registFunction("double cos(double)", cos_double);

		library.registFunction("real cosh(real)", cosh_real);
		library.registFunction("float cosh(float)", cosh_float);
		library.registFunction("double cosh(double)", cosh_double);

		library.registFunction("real erf(real)", erf_real);
		library.registFunction("float erf(float)", erf_float);
		library.registFunction("double erf(double)", erf_double);

		library.registFunction("real erfc(real)", erfc_real);
		library.registFunction("float erfc(float)", erfc_float);
		library.registFunction("double erfc(double)", erfc_double);

		library.registFunction("real exp(real);", exp_real);
		library.registFunction("float exp(float);", exp_float);
		library.registFunction("double exp(double);", exp_double);

		library.registFunction("real exp2(real);", exp2_real);
		library.registFunction("float exp2(float);", exp2_float);
		library.registFunction("double exp2(double)", exp2_double);

		library.registFunction("real expm1(real);", expm1_real);
		library.registFunction("float expm1(float)", expm1_float);
		library.registFunction("double expm1(double)", expm1_double);

		library.registFunction("real fabs(real)", fabs_real);
		library.registFunction("float fabs(float)", fabs_float);
		library.registFunction("double fabs(double)", fabs_double);

		library.registFunction("real fdim(real x, real y)", fdim_real);
		library.registFunction("float fdim(float x, float y)", fdim_float);
		library.registFunction("double fdim(double x, double y)", fdim_double);

		library.registFunction("real floor(real)", floor_real);
		library.registFunction("float floor(float)", floor_float);
		library.registFunction("double floor(double)", floor_double);

		library.registFunction("real fma(real x, real y, real z)", fma_real);
		library.registFunction("float fma(float x, float y, float z)", fma_float);
		library.registFunction("double fma(double x, double y, double z)", fma_double);

		library.registFunction("real fmax(real x, real y)", fmax_real);
		library.registFunction("float fmax(float x, float y)", fmax_float);
		library.registFunction("double fmax(double x, double y)", fmax_double);

		library.registFunction("real fmin(real x, real y)", fmin_real);
		library.registFunction("float fmin(float x, float y)", fmin_float);
		library.registFunction("double fmin(double x, double y)", fmin_double);

		library.registFunction("real fmod(real x, real y)", fmod_real);
		library.registFunction("float fmod(float x, float y)", fmod_float);
		library.registFunction("double fmod(double x, double y)", fmod_double);

		library.registFunction("real frexp(real x, int* y)", frexp_real);
		library.registFunction("float frexp(float x, int* y)", frexp_float);
		library.registFunction("double frexp(double x, int* y)", frexp_double);

		library.registFunction("real hypot(real x, real y)", hypot_real);
		library.registFunction("float hypot(float x, float y)", hypot_float);
		library.registFunction("double hypot(double x, double y)", hypot_double);

		library.registFunction("real ilogb(real)", ilogb_real);
		library.registFunction("float ilogb(float)", ilogb_float);
		library.registFunction("double ilogb(double)", ilogb_double);

		library.registFunction("real ldexp(real x, int y)", ldexp_real);
		library.registFunction("float ldexp(float x, int y)", ldexp_float);
		library.registFunction("double ldexp(double x, int y)", ldexp_double);

		library.registFunction("real lgamma(real)", lgamma_real);
		library.registFunction("float lgamma(float)", lgamma_float);
		library.registFunction("double lgamma(double)", lgamma_double);

		library.registFunction("real log(real);", log_real);
		library.registFunction("float log(float);", log_float);
		library.registFunction("double log(double)", log_double);

		library.registFunction("real log10(real);", log10_real);
		library.registFunction("float log10(float);", log10_float);
		library.registFunction("double log10(double)", log10_double);

		library.registFunction("real log1p(real)", log1p_real);
		library.registFunction("float log1p(float)", log1p_float);
		library.registFunction("double log1p(double)", log1p_double);

		library.registFunction("real log2(real)", log2_real);
		library.registFunction("float log2(float)", log2_float);
		library.registFunction("double log2(double)", log2_double);

		library.registFunction("real logb(real)", logb_real);
		library.registFunction("float logb(float)", logb_float);
		library.registFunction("double logb(double)", logb_double);

		library.registFunction("real modf(real x, real* y)", modf_real);
		library.registFunction("modf(float x, float* y)", modf_float);
		library.registFunction("modf(double x, double* y)", modf_double);

		library.registFunction("real nearbyint(real)", nearbyint_real);
		library.registFunction("float nearbyint(float)", nearbyint_float);
		library.registFunction("double nearbyint(double)", nearbyint_double);

		library.registFunction("real nextafter(real x, real y)", nextafter_real);
		library.registFunction("float nextafter(float x, float y)", nextafter_float);
		library.registFunction("double nextafter(double x, double y)", nextafter_double);

		library.registFunction("real nexttoward(real x, real y)", nexttoward_real);
		library.registFunction("float nexttoward(float x, double y)", nexttoward_float);
		library.registFunction("double nexttoward(double x, double y)", nexttoward_double);

		library.registFunction("real pow(real x, real y)", pow_real);
		library.registFunction("float pow(float x, float y)", pow_float);
		library.registFunction("double pow(double x, double y)", pow_double);

		library.registFunction("real remainder(real x, real y)", remainder_real);
		library.registFunction("float remainder(float x, float y)", remainder_float);
		library.registFunction("double remainder(double x, double y)", remainder_double);

		library.registFunction("real remquo(real x, real y, int* z)", remquo_real);
		library.registFunction("float remquo(float x, float y, int* z)", remquo_float);
		library.registFunction("double remquo(double x, double y, int* z)", remquo_double);

		library.registFunction("real rint(real x)", rint_real);
		library.registFunction("float rint(float x)", rint_float);
		library.registFunction("double rint(double x)", rint_double);

		library.registFunction("real round(real x)", round_real);
		library.registFunction("float round(float x)", round_float);
		library.registFunction("double round(double x)", round_double);

		library.registFunction("real scalbln(real x, long y)", scalbln_real);
		library.registFunction("float scalbln(float x, long y)", scalbln_float);
		library.registFunction("double scalbln(double x, long y)", scalbln_double);

		library.registFunction("real scalbn(real x, int y)", scalbn_real);
		library.registFunction("float scalbn(float x, int y)", scalbn_float);
		library.registFunction("double scalbn(double x, int y)", scalbn_double);

		library.registFunction("real sin(real)", sin_real);
		library.registFunction("float sin(float)", sin_float);
		library.registFunction("double sin(double)", sin_double);

		library.registFunction("real sinh(real)", sinh_real);
		library.registFunction("float sinh(float)", sinh_float);
		library.registFunction("double sinh(double)", sinh_double);

		library.registFunction("real sqrt(real)", sqrt_real);
		library.registFunction("float sqrt(float)", sqrt_float);
		library.registFunction("double sqrt(double)", sqrt_double);

		library.registFunction("real tan(real x)", tan_real);
		library.registFunction("float tan(float x)", tan_float);
		library.registFunction("double tan(double x)", tan_double);

		library.registFunction("real tanh(real x)", tanh_real);
		library.registFunction("float tanh(float x)", tanh_float);
		library.registFunction("double tanh(double x)", tanh_double);

		library.registFunction("real tgamma(real x)", tgamma_real);
		library.registFunction("float tgamma(float x)", tgamma_float);
		library.registFunction("double tgamma(double x)", tgamma_double);

		library.registFunction("real trunc(real x)", trunc_real);
		library.registFunction("float trunc(float x)", trunc_float);
		library.registFunction("double trunc(double x)", trunc_double);

	}
	return &library;
}

void ILibMath::abs_short(int argc, BValue* argv)
{
	short s = argv[1];
	argv[0] = abs(s);
}
void ILibMath::abs_int(int argc, BValue* argv)
{
	int i = argv[1];
	argv[0] = abs(i);
}
void ILibMath::abs_long(int argc, BValue* argv)
{
	long l = argv[1];
	argv[0] = abs(l);
}
void ILibMath::abs_real(int argc, BValue* argv)
{
	BReal r = argv[1];
	argv[0] = abs(r);
}
void ILibMath::abs_float(int argc, BValue* argv)
{
	float f = argv[1];
	argv[0] = abs(f);
}
void ILibMath::abs_double(int argc, BValue* argv)
{
	double d = argv[1];
	argv[0] = abs(d);
}

void ILibMath::acos_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::acos_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::acos_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::acosh_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::acosh_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::acosh_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::asin_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::asin_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::asin_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::asinh_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::asinh_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::asinh_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::atan_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::atan_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::atan_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::atanh_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::atanh_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::atanh_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::atan2_real(int argc, BValue* argv)
{
	BReal y = argv[1];
	BReal x = argv[2];
}
void ILibMath::atan2_float(int argc, BValue* argv)
{
	float y = argv[1];
	float x = argv[2];
}
void ILibMath::atan2_double(int argc, BValue* argv)
{
	double y = argv[1];
	double x = argv[2];
}

void ILibMath::cbrt_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::cbrt_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::cbrt_double(int argc, BValue* argv)
{
	double x = argv[1];
}
void ILibMath::ceil_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::ceil_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::ceil_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::copysign_real(int argc, BValue* argv)
{
	BReal number = argv[1];
	BReal sign = argv[2];
}
void ILibMath::copysign_float(int argc, BValue* argv)
{
	float number = argv[1];
	float sign = argv[2];
}
void ILibMath::copysign_double(int argc, BValue* argv)
{
	double number = argv[1];
	double sign = argv[2];
}

void ILibMath::cos_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = cos(x);
}
void ILibMath::cos_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = cos(x);
}
void ILibMath::cos_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = cos(x);
}

void ILibMath::cosh_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = cosh(x);
}
void ILibMath::cosh_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = cosh(x);
}
void ILibMath::cosh_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = cosh(x);
}

void ILibMath::erf_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::erf_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::erf_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::erfc_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::erfc_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::erfc_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::exp_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::exp_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::exp_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::exp2_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::exp2_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::exp2_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::expm1_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::expm1_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::expm1_double(int argc, BValue* argv)
{
	float x = argv[1];
}

void ILibMath::fabs_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::fabs_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::fabs_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::fdim_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::fdim_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::fdim_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::floor_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::floor_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::floor_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::fma_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
	BReal z = argv[3];
}
void ILibMath::fma_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
	float z = argv[3];
}
void ILibMath::fma_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
	double z = argv[3];
}

void ILibMath::fmax_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::fmax_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::fmax_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::fmin_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::fmin_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::fmin_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::fmod_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::fmod_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::fmod_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::frexp_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BIntArray& vs = argv[2];
}
void ILibMath::frexp_float(int argc, BValue* argv)
{
	float x= argv[1];
	BIntArray& vs = argv[2];
}
void ILibMath::frexp_double(int argc, BValue* argv)
{
	double x= argv[1];
	BIntArray& vs = argv[2];
}

void ILibMath::hypot_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::hypot_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::hypot_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::ilogb_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::ilogb_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::ilogb_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::ldexp_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	int y = argv[2];
}
void ILibMath::ldexp_float(int argc, BValue* argv)
{
	float x = argv[1];
	int y = argv[2];
}
void ILibMath::ldexp_double(int argc, BValue* argv)
{
	double x = argv[1];
	int y = argv[2];
}

void ILibMath::lgamma_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::lgamma_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::lgamma_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::log_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::log_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::log_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::log10_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::log10_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::log10_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::log1p_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::log1p_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::log1p_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::log2_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::log2_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::log2_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::logb_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::logb_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::logb_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::modf_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	BReal* y= argv[2];
}
void ILibMath::modf_float(int argc, BValue* argv)
{
	float x = argv[1];
	float* y= argv[2];
}
void ILibMath::modf_double(int argc, BValue* argv)
{
	double x = argv[1];
	double* y= argv[2];
}

void ILibMath::nearbyint_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::nearbyint_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::nearbyint_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::nextafter_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::nextafter_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::nextafter_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::nexttoward_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	double y = argv[2];
}
void ILibMath::nexttoward_float(int argc, BValue* argv)
{
	float x = argv[1];
	double y = argv[2];
}
void ILibMath::nexttoward_double(int argc, BValue* argv)
{
	double x = argv[1];
	double y = argv[2];
}

void ILibMath::pow_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::pow_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::pow_double(int argc, BValue* argv)
{
	double x= argv[1];
	double y= argv[2];
}

void ILibMath::remainder_real(int argc, BValue* argv)
{
	BReal x= argv[1];
	BReal y= argv[2];
}
void ILibMath::remainder_float(int argc, BValue* argv)
{
	float x= argv[1];
	float y= argv[2];
}
void ILibMath::remainder_double(int argc, BValue* argv)
{
	double x= argv[1]; double y= argv[2];
}

void ILibMath::remquo_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	BReal y = argv[2];
	BClass* array = argv[3];
}
void ILibMath::remquo_float(int argc, BValue* argv)
{
	float x = argv[1];
	float y = argv[2];
	BClass* array = argv[3];
}
void ILibMath::remquo_double(int argc, BValue* argv)
{
	double x = argv[1];
	double y = argv[2];
	BClass* array = argv[3];
}

void ILibMath::rint_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::rint_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::rint_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::round_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::round_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::round_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::scalbln_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	BLong y = argv[2];
}
void ILibMath::scalbln_float(int argc, BValue* argv)
{
	float x = argv[1];  BLong y = argv[2];
}
void ILibMath::scalbln_double(int argc, BValue* argv)
{
	double x = argv[1];
	BLong y = argv[2];
}

void ILibMath::scalbn_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	int y = argv[2];
}
void ILibMath::scalbn_float(int argc, BValue* argv)
{
	float x = argv[1];
	int y = argv[2];
}
void ILibMath::scalbn_double(int argc, BValue* argv)
{
	double x = argv[1];
	int y = argv[2];
}

void ILibMath::sin_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = sin(x);
}
void ILibMath::sin_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = sin(x);
}
void ILibMath::sin_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = sin(x);
}

void ILibMath::sinh_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = sinh(x);
}
void ILibMath::sinh_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = sinh(x);
}
void ILibMath::sinh_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = sinh(x);
}

void ILibMath::sqrt_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = sqrt(x);
}
void ILibMath::sqrt_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = sqrt(x);
}
void ILibMath::sqrt_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = sqrt(x);
}

void ILibMath::tan_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = tan(x);
}
void ILibMath::tan_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = tan(x);
}
void ILibMath::tan_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = tan(x);
}

void ILibMath::tanh_real(int argc, BValue* argv)
{
	BReal x = argv[1];
	argv[0] = tanh(x);
}
void ILibMath::tanh_float(int argc, BValue* argv)
{
	float x = argv[1];
	argv[0] = tanh(x);
}
void ILibMath::tanh_double(int argc, BValue* argv)
{
	double x = argv[1];
	argv[0] = tanh(x);
}

void ILibMath::tgamma_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::tgamma_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::tgamma_double(int argc, BValue* argv)
{
	double x = argv[1];
}

void ILibMath::trunc_real(int argc, BValue* argv)
{
	BReal x = argv[1];
}
void ILibMath::trunc_float(int argc, BValue* argv)
{
	float x = argv[1];
}
void ILibMath::trunc_double(int argc, BValue* argv)
{
	double x = argv[1];
}
